<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>密码修改</title>
    <%@ include file="../../common_header.jsp" %>
    
	<script type="text/javascript">
	//所有的子窗体都需要有一个save函数，当点击弹出窗体的保存按钮时所进行的操作
	function btnSave_click()
	{
	    var fun_ret = false;
	    if($('#newPwd').val() != $('#confirmPwd').val())
	    {
	    	 $.messager.alert("提示","请输入两次新密码！",'info');
	        return false;
	    }
	   var vals =$('#formModule').serialize();
	   var url = '${ctx }/manage/savePwd';
	   $.ajax({
	       async: false, 
	       type: "POST", 
	       url : url,
	       data:vals,
	       cache:false,
	       dataType : 'json', 
	       success : function(data) { 
	           if(data.success!=0)
	           {
	        	   $.messager.alert("提示",data.msg,'info');
	           }
	           else
	           {
	               fun_ret = true;
	           }
	       } 
	   });
	   return fun_ret;
	}
	</script>
  </head>
  <body>
		<div style="padding:0px">
	    <form id="formModule" method="post">
            <table cellpadding="2" border="0">
                <tr height="30">
                    <td>旧密码:</td>
                    <td><input id="oldPwd" class="easyui-validatebox textbox" style="width: 180;height: 25" type="text" name="oldPwd" data-options="required:true" value=""></input></td>
                </tr>
                <tr height="30">
                    <td>新密码:</td>
                    <td><input id="newPwd" class="easyui-validatebox textbox" style="width: 180;height: 25" type="password" name="newPwd" data-options="required:true" value=""></input></td>
                </tr>
                <tr height="30">
                    <td>确认密码:</td>
                    <td><input id="confirmPwd" class="easyui-validatebox textbox" style="width: 180;height: 25" type="password" name="confirmPwd" data-options="required:true" value=""></input></td>
                </tr>

            </table>
	    </form>
	    </div>
  </body>
</html>
